
package com.goseet.ffmpeg;

public final class b extends c {
    private long b;

    public b() {
        this(ffmpegJNI.new_MediaInput());
    }

    private b(long l) {
        super(ffmpegJNI.SWIGMediaInputUpcast(l));
        b = l;
    }

    protected static long a(b b1) {
        long l;
        if (b1 == null)
            l = 0L;
        else
            l = b1.b;
        return l;
    }

    public final void a() {
        synchronized (this) {
            if (b != 0L) {
                if (a) {
                    a = false;
                    ffmpegJNI.delete_MediaInput(b);
                }
                b = 0L;
            }
            super.a();
        }
    }

    public final boolean a(a a1, long l, long l1) {
        long l2 = b;
        long l3 = com.goseet.ffmpeg.a.a(a1);
        b b1 = this;
        a a2 = a1;
        long l4 = l;
        long l5 = l1;
        return ffmpegJNI.MediaInput_trim(l2, b1, l3, a2, l4, l5);
    }

    public final boolean a(String s) {
        return ffmpegJNI.MediaInput_open(b, this, s);
    }

    public final boolean b() {
        return ffmpegJNI.MediaInput_close(b, this);
    }

    protected final void finalize() {
        a();
    }
}
